package Homework;

import java.util.Scanner;

public class Name {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("我的姓名是汪翔");
		System.out.println("我的姓名缩写为wangxiang");
		int w = 119;
		int a =97;
		int n =110;
		int g = 103;
		int i =105;
		int x =120;
		System.out.println("我的姓名对应的ascll码为"+(w+a*2+n*2+i+g*2+x));


		//方法2

		System.out.print("请输入姓名拼音：");
		char j= input.next().charAt(0);
		char b= input.next().charAt(0);
		char c= input.next().charAt(0);
		char d= input.next().charAt(0);
		char e= input.next().charAt(0);
		char f= input.next().charAt(0);
		char k= input.next().charAt(0);
		char h= input.next().charAt(0);
		char l= input.next().charAt(0);
		System.out.println("我的姓名ascll码之和为："+(int)(j+b+c+d+e+f+k+l+h));
	}
}
